package cloud.xlh.digital_power_card.intergration.card.adapter;

import cloud.xlh.digital_power_card.client.card.dto.OpenCardDTO;
import cloud.xlh.digital_power_card.domian.card.CardSaveDomain;
import cloud.xlh.infrastructure.utils.CommonUtil;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : xlh_osms
 * @ Author: XuLeHuang
 * @ Date: 2023/9/11 13:18
 * @ Description:
 */
@Component
public class CardClientAdapter {
    public CardSaveDomain convertCardSaveDomain(OpenCardDTO openCardDTO) {
        CardSaveDomain cardSaveDomain = new CardSaveDomain();
        CommonUtil.copyPropertiesIgnoreCase(openCardDTO , cardSaveDomain);
        return cardSaveDomain;
    }
}
